<div class="modal fade bs-modal-lg" id="modelContent">
	<div class="modal-dialog modal-lg">
        <div class="modal-content"></div>
    </div>
</div> 
<div class="portlet box green">
	<div class="portlet-title">
		<div class="caption"><i class="fa fa-cog"></i>查询内容</div>
		<div class="tools">
			<a href="javascript:;" class="collapse right" data-original-title="" title=""> </a>
    	</div>
		<div class="actions">
			<a href="javascript:;" class="btn white btn-sm ajax-search" ><i class="fa fa-search"></i>查询</a>
			<a href="javascript:;" class="btn white btn-sm search-reset" ><i class="fa fa-eraser"></i>清除</a>
		</div>
	</div>
	<div class="portlet-body form">
		<form action="/notice/list" class="form-horizontal" method="get" id="searchForm" onsubmit="return false">
			<div class="form-body">
				<div class="row">
					<div class="col-md-3">
						<label class="col-md-4 control-label">公告标题：</label>
						<div class="col-md-8">
							<input class="form-control" type="text" name="title" maxlength="10" value="$!title">
						</div>
					</div>
					<div class="col-md-3">
						<label class="col-md-4 control-label">发布时间：</label> 
						<label class="col-md-8">
							<input class="form-control" type="text" name="startTime" id="startTime" value="$!startTime" readonly>
							<i class="fa fa-calendar" style="position: absolute;right: 10px;top: 10px"></i>
						</label>
					</div>
					<div class="col-md-3">
						<label class="col-md-2 control-label">至：</label>
						<label class="col-md-8">
							<input class="form-control" type="text" name="endTime" id="endTime"  value="$!endTime" readonly>
							<i class="fa fa-calendar" style="position: absolute;right: 10px;top: 10px"></i>
						</label>
					</div>
				</div>
			</div>
		</form>
	</div>
</div>

<div class="portlet box green">
    <div class="portlet-title">
		<div class="caption"><i class="fa fa-cogs"></i>数据列表</div>
		<div class="tools"><a href="javascript:;" class="collapse" data-original-title="" title=""> </a></div>
		<div class="actions"><a href="/notice/add" class="btn white btn-sm ajaxify" code="notice.add" ><i class="fa fa-plus"></i> 新增 </a></div>
    </div>
    <div class="portlet-body">
    	<div class="dataTables_wrapper no-footer">
			<div class="table-scrollable">
				<table class="table table-striped table-bordered table-hover">
		            <thead>
		                <tr>
		                    <th> 公告标题 </th>
		                    <th> 创建时间 </th>
		                    <th> 修改时间 </th>
		                    <th> 发布状态 </th>
		                    <th class="col-md-3"> 操作 </th>
		                </tr>
		            </thead>
		            <tbody>
		                #foreach ($!item in $!pageNotice.result)
		                 <tr>
		                     <td>$!item.title</td>
		                     <td>$!item.createTimeString</td>
		                     <td>$!item.modifyTimeString</td>
		                     <td>
		                     	#if($!item.status)
		                     	<span>已发布  $!item.publishTimeString</span>
		                     	#else
		                     	<span>未发布</span>
		                     	#end
		                     </td>
		                     <!-- <td> 
		                     #if($!item.status==0)
		                     	<input  type='checkbox' data-size='small' class='make-switch'  sendid="$!{item.id}"   data-on-color='success'   data-off-color='warning' />
		                     #else 
		                     	 <input  type='checkbox' data-size='small' class='make-switch' checked  sendid="$!{item.id}"   data-on-color='success'   data-off-color='warning' />
		                     #end
		                     </td> -->
		                     <td>
		                     	#if($!item.status)
								<a class="btn green btn-outline btn-sm ajaxify" code="notice.publish" href="/notice/publish?id=$!item.id&$!queryReturn">
										<i class="fa fa-tags"></i> 取消发布
								</a>
								#else
								<a class="btn green btn-outline btn-sm ajaxify" code="notice.publish" href="/notice/publish?id=$!item.id&$!queryReturn">
									<i class="fa fa-tags"></i> 发布
								</a>
		                        <a class="btn green btn-outline btn-sm ajax-model-get" code="notice.edit" data-toggle="modal" href="#modelContent"  thref="/notice/edit?id=$!item.id&$!queryString">
									<i class="fa fa-edit"></i> 修改
								</a>
								<a class="btn green btn-outline btn-sm ajax-delete" code="notice.delete" href="javascript:;" thref="/notice/delete?id=$!{item.id}">
									<i class="fa fa-trash"></i> 删除
								</a>
								#end
		                     </td>
		                 </tr>
		                #end
		            </tbody>
	        	</table>
			</div>
			#set($page=$pageNotice)
			#set($pageUrl="/notice/list.do?$!queryString&pageNo=")
			#parse("_page.htm")
		</div>
    </div>
</div>
<script type="text/javascript" src="/assets/scripts/views-permission.js"></script>
<script src="/assets/scripts/views-date.js" type="text/javascript"></script>
<script type="text/javascript">
bootstrapSwitch.init({url:"notice/modifiedStatus",ontext:"已发布",offtext:"未发布"});
$("input[name=title]").focus();
</script>

